<div id="shopping-cart">
    <p id="number-items">
        <a href="#data" id="products-link">
            <img src="images/shopping-cart.png" alt="Panier" />
            <span id="number">0</span> article(s)
        </a>
    </p>
</div>

<div style="display:none">
    <div id="data">
        <h4>Produits sélectionnés</h4>

        <ul id="shopping-list"></ul>
    </div>
</div>

<table id="products-axis" width="100%">
    <tr>
        <td width="20%" style="vertical-align: top">
            <div class="fixed">
				<div id="suggested-product">
				</div>
				
                <h4>Axes Barycentre :</h4>
                <ul>
                    <?php
                    foreach ($context->a_o_axis as $o_axis) {
                        ?>
                        <li id="axis-<?php echo $o_axis->id ?>" class="axis">
                            >> <?php echo $o_axis->label ?> : 
                            <span id="axisValue-<?php echo $o_axis->id ?>"></span>
                        </li>
                        <?php
                    }
                    ?>
                </ul>
                <hr/>
                <h4>Axes Produit : <span id="productTitle"></span></h4>
                <ul>
                    <?php
                    foreach ($context->a_o_axis as $o_axis) {
                        ?>
                        <li class="axis">
                            >> <?php echo $o_axis->label ?> : 
                            <span id="ProductAxisValue-<?php echo $o_axis->id ?>"></span>
                        </li>
                        <?php
                    }
                    ?>
                </ul>
            </div>
        </td>
        <td>
            <div id="productList" class="viewGrid">
                <?php
                foreach ($context->a_o_products as $o_product) {
                    $sz_additionnalClass = ($o_product->status > 0) ? 'axedProduct' : 'nonAxedProduct';
                    ?>
                    <div>
                        <div id="product-<?php echo $o_product->id ?>" class="product <?php echo $sz_additionnalClass ?>" >
                            <div style="margin: auto">
								<div class="product-title"><?php echo $o_product->name ?></div>
                                <?php
                                $a_imageSize = getimagesize(getCompleteProductsImagePath($o_product->picture));
                                $i_width = $a_imageSize[0];
                                $i_height = $a_imageSize[1];

                                if ($i_width < $i_height) {
                                    $f_divisor = $i_width / 206;
                                    $i_width = $i_width / $f_divisor;
                                    $i_height = $i_height / $f_divisor;
                                } else {
                                    $f_divisor = $i_height / 170;
                                    $i_width = $i_width / $f_divisor;
                                    $i_height = $i_height / $f_divisor;
                                }
                                ?>
                                <img alt="" src="<?php echo getCompleteProductsImagePath($o_product->picture) ?>" class="thumb" style="width:<?php echo $i_width; ?>px; height:<?php echo $i_height; ?>px;" />
                                <br/>
                            </div>
                        </div>
                    </div>
                    <?php
                }
                ?>
            </div>
        </td>
    </tr>
</table>
<script type="text/javascript">
    jQuery(document).ready(function() {
        $(".thumb").thumbs();
        FOUR_CLICS.init();
        SHOW_PRODUCT.init();
    });
</script>
